package bizlogic;

import model.UserDTO;
import dao.DAOException;
import dao.DAOFactory;
import dao.IUserDAO;

public class AdminManager {
	public IUserDAO userDAO;
	
	public AdminManager()
	{
		userDAO = DAOFactory.loadInstance().getUserDAO();
		System.out.println("Pass Obj");
	}
	
	public void insertUser (UserDTO user)
	{
		try{
			System.out.println("Name" + user.getuName());
			System.out.println("Password" + user.getuPassword());
			System.out.println("txtEmail" + user.getEmail());
			System.out.println("rodGender" + user.getGender());
			System.out.println("date" + user.getDOB());
		
			userDAO.insertUser(user);
		}
		catch(DAOException e){
			e.printStackTrace();
		}
	}
}
